const updCart = require('./updCart/index');
const getCartList = require('./getCartList/index');

// 云函数入口函数
// event：获取前端传递的所有数据
exports.main = async (event, context) => {
  // 根据前端传递的 type 字段进行分发
  switch (event.type) {
    case 'updCart':
      return await updCart.main(event, context);
    case 'getCartList':
      return await getCartList.main(event, context);
  }
};
